@inherits AppComponentBase

<BitInfiniteScrolling ItemsProvider="LoadProducts" Class="products-inf-scr" ScrollerSelector="body" LastElementHeight="96px" Preload>
    <ItemTemplate Context="product">
        <BitLink Href="@product.PageUrl" NoUnderline Class="product-item">
            <BitCard FullSize>
                <BitStack Class="product-stack">
                    <ProductImage Src="@GetProductImageUrl(product)" Alt="@product.PrimaryImageAltText" Width="100%" />
                    <BitText>@product.Name</BitText>
                    <div>@((MarkupString)product.DescriptionHTML!)</div>
                    <BitText Typography="BitTypography.H6">@product.FormattedPrice</BitText>
                </BitStack>
            </BitCard>
        </BitLink>
    </ItemTemplate>
    <LoadingTemplate>
        <BitCard FullSize Class="product-item">
            <BitStack Class="product-stack">
                <BitShimmer Height="200px" Width="100%" Background="BitColor.PrimaryBackground" />
                <BitShimmer Height="1rem" Width="100%" Background="BitColor.PrimaryBackground" />
                <BitShimmer Height="1rem" Width="100%" Background="BitColor.PrimaryBackground" />
                <BitShimmer Height="1rem" Width="100%" Background="BitColor.PrimaryBackground" />
                <BitShimmer Height="2rem" Width="100%" Background="BitColor.PrimaryBackground" />
            </BitStack>
        </BitCard>
    </LoadingTemplate>
</BitInfiniteScrolling>